'''
Created on 22 janv. 2013

@author: tclain
'''
from model.Value import *

class ValuesManager(object):
    '''        
    Class used to stores values given by user
    '''
    def __init__(self,rawValues):
        '''
        Create the variables container that is a list of Variable Object
        param : rawVars, a dictionnary filled with rawString Variable with this format name:defaultvalue
        '''
        self.values = []
        self._parseValues(rawValues)
        #print self.vars[0]
        
    def _parseValues(self,rawValues):
        '''
        fill the array self.vars with instances of Variable class
        '''
        for rval in rawValues :
            self.vars.append(Value(rval))
    def __str__(self):
        '''
        str representation of the variable heap
        '''
        s = ""
        for v in self.values :
            s += str(v) + "\n"
        return s